package com.example.logistics_oa.controller;


import com.example.comment_oa.response.AjaxResponse;
import com.example.logistics_oa.service.JibenButiejisuanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/logisticsOa")
@CrossOrigin
public class JiBenBuTieController {

    @Autowired
    JibenButiejisuanService jibenButiejisuanService;

    @PostMapping("/updateBuTieOne/{BuTieId}/{gonghao}")
    public AjaxResponse updateBuTieOne(@PathVariable("BuTieId") String BuTieId,@PathVariable("gonghao") String gonghao){
        jibenButiejisuanService.updateBuTieOne(BuTieId,gonghao);
        return AjaxResponse.success();
    }


    @PostMapping("/updateBuTieAll/{BuTieId}")
    public AjaxResponse updateBuTieAll(@PathVariable("BuTieId") String BuTieId){
        jibenButiejisuanService.updateBuTieAll(BuTieId);
        return AjaxResponse.success();
    }
}
